import request from '@/utils/request'

const api = {
    getTree:'/cms/sysCompany/queryOrganizationCompanyDeptTree',
    adduser:'/cms/user/save',
    adddepartment:'/cms/sysDept/save',
    getuser:'/cms/user/queryPageList',
    addgongsi:'/cms/sysCompany/save',
    gongsiTree:'/cms/sysCompany/queryOrganizationCompanyTree',
    getgongsi:'/cms/sysCompany/get',
    getbumen:'/cms/sysDept/get',
    deletegongsi:'/cms/sysCompany/delete',
    deletebumen:'/cms/sysDept/delete',
    deleteuser:'/cms/user/delete',
    getuserlist:'/cms/sysRole/queryAllList',
    resetpassword:'/cms/userPossword/saveResetLogin',
    getxianqing:'/cms/dangerInfo/queryPageList',
    daoru:'/cms/user/export; ',
    xiazaimuban:'/cms/user/download',
    editGoogleVerifyEnable:'/cms/user/editGoogleVerifyEnable', //启用/停用谷歌验证
  }
    //下载模板
    export function xiazai (parameter) {
      return request({
        url: api.xiazaimuban,
        method: 'get',
      })
    }
    //导入角色列表
    export function daorujuese (parameter) {
      return request({
        url: api.daoru,
        method: 'post',
        data: parameter
      })
    }
    //获取角色列表  
    export function getuserlist (parameter) {
      return request({
        url: api.getuserlist,
        method: 'post',
        data: parameter
      })
    }
    export function getxianqing (parameter) {
      return request({
        url: api.getxianqing,
        method: 'post',
        data: parameter
      })
    }
  //获取公司部门树
  export function getTree (parameter) {
    return request({
      url: api.getTree,
      method: 'post',
      data: parameter
    })
  }
  //新增人员
  export function adduser (parameter) {
    return request({
      url: api.adduser,
      method: 'post',
      data: parameter
    })
  }
  //新增公司
  export function addgongsi (parameter) {
    return request({
      url: api.addgongsi,
      method: 'post',
      data: parameter
    })
  }
  //获取公司树
  export function gongsiTree (parameter) {
    return request({
      url: api.gongsiTree,
      method: 'post',
      data: parameter
    })
  }
  //新增部门
  export function adddepartment (parameter) {
    return request({
      url: api.adddepartment,
      method: 'post',
      data: parameter
    })
  }
  //查找人员  
  export function getuser (parameter) {
    return request({
      url: api.getuser,
      method: 'post',
      data: parameter
    })
  }
  //删除人员
  export function deleteuser (parameter) {
    return request({
      url: api.deleteuser,
      method: 'post',
      data: parameter
    })
  }
  //获取公司   
  export function getgongsi (parameter) {
    return request({
      url: api.getgongsi,
      method: 'post',
      data: parameter
    })
  }
  //删除公司
  export function deletegongsi (parameter) {
    return request({
      url: api.deletegongsi,
      method: 'post',
      data: parameter
    })
  }
  //获取部门  
  export function getbumen (parameter) {
    return request({
      url: api.getbumen,
      method: 'post',
      data: parameter
    })
  }
    //删除部门  
    export function deletebumen (parameter) {
      return request({
        url: api.deletebumen,
        method: 'post',
        data: parameter
      })
    }
    //重置密码
    export function resetpassword (parameter) {
      return request({
        url: api.resetpassword,
        method: 'post',
        data: parameter
      })
    }

    export function editGoogleVerifyEnable (parameter) {
      return request({
        url: api.editGoogleVerifyEnable,
        method: 'post',
        data: parameter
      })
    }
    